<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
<script type="text/javascript" src="${base}/jstool/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="${base}/jstool/bootstrap-3.3.7/js/bootstrap.js"></script>
<link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-3.3.7/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-3.3.7/css/bootstrap-theme.css" />

    <script type="text/javascript" src="${base}/jstool/bootstrap-switch/bootstrap-switch.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-switch/bootstrap-switch.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript" src="${base}/jstool/bootstrap-select/js/bootstrap-select.min.js"></script>
    <script type="text/javascript" src="${base}/jstool/bootstrap-select/lang/defaults-zh_CN.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${base}/jstool/bootstrap-select/css/bootstrap-select.min.css" />

<style type="text/css">
    .table-class{
        width:99%;
        text-align: center;
        border:1px solid #afd9ee;
        margin:0 auto;
        margin-top: 10px;
    }
    .list-path{
        height: 50px;
        line-height: 50px;
        background-color: #9acfea;

    }
    table th{
        text-align: center;
        WORD-WRAP: break-word;
        width: 100px;
    }
    .table-list td{
        font-size:12px;
        padding:0px;
        margin: 0px;

    }

    .table-query{
        /*height: 40px;*/
        /*width:80px;*/
        /*text-align: center;*/
        white-space:nowrap;
        /*position: relative;*/
        float: left;
        display:inherit;
        /*display: inline;*/


    }
    .table-head{
        background-color: #9acfea;
    }
    .label-head{
        height: 20px;
        width: 100%;
    }
    .bs-example .input-group{
        width:300px;
        float: left;
        margin-top:20px;

    }
    .bank-label{
        width:25px;
        float: left;
    }
    .label-hidden{
        display: none;
    }
    .panel-body{
        padding-top: 0px;
    }
    .input-group input[type='text']{
        z-index: inherit;
    }

</style>

<script type="text/javascript">
    $(function() {
        //初始化
        $('.isdatetimepicker').datetimepicker( {
            language: 'zh-CN',
            autoclose : true,
            todayBtn : true
        });
        var trs = $('.table-list tbody').children();
        var thList = $('.table-head').children();

        if (typeof(trs)!= "undefined" && trs != null &&typeof(thList)!= "undefined" && thList != null){
            if(trs.length==0){
                var content = "";
                content+= "<tr>";
                content+= '<td colspan="'+thList.length+'" style="color: red"> 没有相关数据 </td>';
                content+= "</tr>";
                $('.table-list tbody').append(content);
            }
            $('.table-head-btn').css('colspan',thList.length);
        }



        $("body").prepend($('#listnav'));
        $('#listnav').css('display','');
        $(".table-list").after($('#pagination'));
        $('#pagination').css('display','');
        $(".table-list").before($('#table-msg'));
        $('#table-msg').css('display','');

    });

    function setPage(pageNo,pageSize){
        var lianjie=document.location.href;
        var lianjie = lianjie.substr(0,lianjie.indexOf('?'))
        var href = lianjie+"?";
        href+=queryCondition();
        href+="&pageNo="+pageNo;
        href+="&pageSize="+pageSize;
        location.href=href;
    }
    function checkDelete(url){
        if (window.confirm("确认删除吗?")) {
            location.href=url;
        }
    }



    function query(url){
        var href = url+"?";
        href+=queryCondition();
        location.href=href;
    }
</script>

<div id="listnav" class="list-path" style="display:none"> <span style="margin-left: 50px;"><span class="glyphicon glyphicon-home"></span>
 <#list Session.listnav?reverse as nv>
     ${nv.name!}
     <#if nv_index!=Session.listnav?size-1>
         /
     </#if>
 </#list>
 <#list Session.listnav?reverse as nv>

     <#if nv_index==1>
         <div style="float: right; margin-right: 40px;">
              <#list Session.listnav?reverse as nv>
                    <#if nv_index==0>
        <a class="btn btn-info"
           href="javaScript:self.location='${base}${nv.url!}'">返回</a>
                    </#if>
                  </#list>
    </div>
     </#if>
 </#list>
</span></div>

<div id="table-msg" style="display: none">
<#if failed??>
    <div class="alert alert-danger">
        <a href="#" class="close" data-dismiss="alert">&times;</a><strong>操作失败！</strong>${failed!}
    </div>
</#if>
<#if success??>
    <div class="alert alert-success">
        <a href="#" class="close" data-dismiss="alert">×</a> <strong>操作成功!</strong>${success!}
    </div>
</#if>

</div>

<ul id="pagination" class="pagination" style="display: none">

    <#if pagination??>
        <#if pagination.pageNo gt 1>
            <li><a href="javascript:setPage(1,'${pagination.pageSize}')">首页</a></li>
        </#if>
        <#list 5..1 as t>
            <#if (pagination.pageNo-t gt 0)>
                <li><a href="javascript:setPage('${pagination.pageNo-t}','${pagination.pageSize}')">${pagination.pageNo-t}</a></li>
            </#if>
        </#list>
        <li><a href="#" style="background-color: #ddd;">${pagination.pageNo}</a></li>
        <#list 1..5 as t>
            <#if (pagination.totalPage gt pagination.pageNo+t-1)>
                <li><a href="javascript:setPage('${pagination.pageNo+t}','${pagination.pageSize}')">${pagination.pageNo+t}</a></li>
            </#if>
        </#list>
        <#if pagination.totalPage gt pagination.pageNo>
            <li><a href="javascript:setPage('${pagination.totalPage}','${pagination.pageSize}')">尾页</a></li>
        </#if>

    </#if>
    <li><span>共</span></li>
    <li><span>${pagination.totalCount?default(0)}</span> </li>
    <li><span>条</span></li>
</ul>
<!--table-list-->